// 将key作为一个变量保存
const CHANNEL_KEY = 'hmtt76_channel'

// 1.保存token，带参数
export const setChannel = (list) => {
  window.localStorage.setItem(CHANNEL_KEY, JSON.stringify(list))
}
// 2.获取频道，不带参数，需要返回
export const getChannel = () => {
  return JSON.parse(window.localStorage.getItem(CHANNEL_KEY))
}

// 3.删除token，不带参数，不返回
export const removeChannel = () => {
  window.localStorage.removeItem(CHANNEL_KEY)
}
